package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.ImGroupRule;
import com.sc.nft.entity.vo.AdminGroupRuleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ImGroupRuleMapper extends BaseMapper<ImGroupRule> {

    /**
     * 获取数据是否存在交集
     *
     * @param id
     * @param start
     * @param end
     * @return
     */
    Integer intersectionExamine(@Param("id") Long id, @Param("start") Integer start, @Param("end") Integer end);

    /**
     * 根据官方群数量获取对应的用户
     *
     * @param sum
     * @return
     */
    ImGroupRule accordingOfficialGroupSumGetRule(@Param("sum") Integer sum);

    /**
     * 后台获取配置规则列表
     *
     * @param page
     * @return
     */
    Page<AdminGroupRuleVO> getList(Page page);

}
